/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package piplayer.impl.pi;

import piplayer.intrface.TrackPlayer;

/**
 *
 * @author richb
 */
public class Mpg123TrackPlayer_LiveTest
{
    public static void main(String[] args)
    {
        
        final TrackPlayer tp = new Mpg123TrackPlayer("mpg123");
        
        tp.begin();
        
        easySleep(5000);
        
        System.out.println("Starting first Guillotine ...");
        tp.playTrack("/home/pi/Guillotine.mp3", 0);
        
        easySleep(10000);
        
        System.out.println("Starting second Guillotine ...");
        tp.playTrack("/home/pi/Guillotine.mp3", 0);
        
        easySleep(10000);
        
        System.out.println("end()ing ...");
        tp.end();
        
        System.out.println("Waiting a while for it to end ...");
        easySleep(10000);
        
        System.exit(0);
    }
    
    private static void easySleep(long ms)
    {
        try
        {
            Thread.sleep(ms);
        }
        catch (InterruptedException e)
        {
            /* Meh */
        }
    }
}
